/*
 * MIT License
 *
 * Copyright (c) 2018 Aberic Yang
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: block/Block.proto

package cn.aberic.bother.entity.proto.block;

public final class BlockProto {
  private BlockProto() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface BlockOrBuilder extends
      // @@protoc_insertion_point(interface_extends:Block)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * 区块头部信息
     * </pre>
     *
     * <code>.BlockHeader header = 1;</code>
     */
    boolean hasHeader();
    /**
     * <pre>
     * 区块头部信息
     * </pre>
     *
     * <code>.BlockHeader header = 1;</code>
     */
    BlockHeaderProto.BlockHeader getHeader();
    /**
     * <pre>
     * 区块头部信息
     * </pre>
     *
     * <code>.BlockHeader header = 1;</code>
     */
    BlockHeaderProto.BlockHeaderOrBuilder getHeaderOrBuilder();

    /**
     * <pre>
     * 区块数据体
     * </pre>
     *
     * <code>.BlockBody body = 2;</code>
     */
    boolean hasBody();
    /**
     * <pre>
     * 区块数据体
     * </pre>
     *
     * <code>.BlockBody body = 2;</code>
     */
    BlockBodyProto.BlockBody getBody();
    /**
     * <pre>
     * 区块数据体
     * </pre>
     *
     * <code>.BlockBody body = 2;</code>
     */
    BlockBodyProto.BlockBodyOrBuilder getBodyOrBuilder();
  }
  /**
   * Protobuf type {@code Block}
   */
  public  static final class Block extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Block)
      BlockOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Block.newBuilder() to construct.
    private Block(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Block() {
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Block(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              BlockHeaderProto.BlockHeader.Builder subBuilder = null;
              if (header_ != null) {
                subBuilder = header_.toBuilder();
              }
              header_ = input.readMessage(BlockHeaderProto.BlockHeader.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(header_);
                header_ = subBuilder.buildPartial();
              }

              break;
            }
            case 18: {
              BlockBodyProto.BlockBody.Builder subBuilder = null;
              if (body_ != null) {
                subBuilder = body_.toBuilder();
              }
              body_ = input.readMessage(BlockBodyProto.BlockBody.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(body_);
                body_ = subBuilder.buildPartial();
              }

              break;
            }
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return BlockProto.internal_static_Block_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return BlockProto.internal_static_Block_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              BlockProto.Block.class, BlockProto.Block.Builder.class);
    }

    public static final int HEADER_FIELD_NUMBER = 1;
    private BlockHeaderProto.BlockHeader header_;
    /**
     * <pre>
     * 区块头部信息
     * </pre>
     *
     * <code>.BlockHeader header = 1;</code>
     */
    public boolean hasHeader() {
      return header_ != null;
    }
    /**
     * <pre>
     * 区块头部信息
     * </pre>
     *
     * <code>.BlockHeader header = 1;</code>
     */
    public BlockHeaderProto.BlockHeader getHeader() {
      return header_ == null ? BlockHeaderProto.BlockHeader.getDefaultInstance() : header_;
    }
    /**
     * <pre>
     * 区块头部信息
     * </pre>
     *
     * <code>.BlockHeader header = 1;</code>
     */
    public BlockHeaderProto.BlockHeaderOrBuilder getHeaderOrBuilder() {
      return getHeader();
    }

    public static final int BODY_FIELD_NUMBER = 2;
    private BlockBodyProto.BlockBody body_;
    /**
     * <pre>
     * 区块数据体
     * </pre>
     *
     * <code>.BlockBody body = 2;</code>
     */
    public boolean hasBody() {
      return body_ != null;
    }
    /**
     * <pre>
     * 区块数据体
     * </pre>
     *
     * <code>.BlockBody body = 2;</code>
     */
    public BlockBodyProto.BlockBody getBody() {
      return body_ == null ? BlockBodyProto.BlockBody.getDefaultInstance() : body_;
    }
    /**
     * <pre>
     * 区块数据体
     * </pre>
     *
     * <code>.BlockBody body = 2;</code>
     */
    public BlockBodyProto.BlockBodyOrBuilder getBodyOrBuilder() {
      return getBody();
    }

    private byte memoizedIsInitialized = -1;
    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (header_ != null) {
        output.writeMessage(1, getHeader());
      }
      if (body_ != null) {
        output.writeMessage(2, getBody());
      }
      unknownFields.writeTo(output);
    }

    @Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (header_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getHeader());
      }
      if (body_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getBody());
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof BlockProto.Block)) {
        return super.equals(obj);
      }
      BlockProto.Block other = (BlockProto.Block) obj;

      boolean result = true;
      result = result && (hasHeader() == other.hasHeader());
      if (hasHeader()) {
        result = result && getHeader()
            .equals(other.getHeader());
      }
      result = result && (hasBody() == other.hasBody());
      if (hasBody()) {
        result = result && getBody()
            .equals(other.getBody());
      }
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasHeader()) {
        hash = (37 * hash) + HEADER_FIELD_NUMBER;
        hash = (53 * hash) + getHeader().hashCode();
      }
      if (hasBody()) {
        hash = (37 * hash) + BODY_FIELD_NUMBER;
        hash = (53 * hash) + getBody().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static BlockProto.Block parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static BlockProto.Block parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static BlockProto.Block parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static BlockProto.Block parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static BlockProto.Block parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static BlockProto.Block parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static BlockProto.Block parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static BlockProto.Block parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static BlockProto.Block parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static BlockProto.Block parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static BlockProto.Block parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static BlockProto.Block parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(BlockProto.Block prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code Block}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:Block)
        BlockProto.BlockOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return BlockProto.internal_static_Block_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return BlockProto.internal_static_Block_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                BlockProto.Block.class, BlockProto.Block.Builder.class);
      }

      // Construct using cn.aberic.bother.entity.proto.block.BlockProto.Block.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @Override
      public Builder clear() {
        super.clear();
        if (headerBuilder_ == null) {
          header_ = null;
        } else {
          header_ = null;
          headerBuilder_ = null;
        }
        if (bodyBuilder_ == null) {
          body_ = null;
        } else {
          body_ = null;
          bodyBuilder_ = null;
        }
        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return BlockProto.internal_static_Block_descriptor;
      }

      @Override
      public BlockProto.Block getDefaultInstanceForType() {
        return BlockProto.Block.getDefaultInstance();
      }

      @Override
      public BlockProto.Block build() {
        BlockProto.Block result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public BlockProto.Block buildPartial() {
        BlockProto.Block result = new BlockProto.Block(this);
        if (headerBuilder_ == null) {
          result.header_ = header_;
        } else {
          result.header_ = headerBuilder_.build();
        }
        if (bodyBuilder_ == null) {
          result.body_ = body_;
        } else {
          result.body_ = bodyBuilder_.build();
        }
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof BlockProto.Block) {
          return mergeFrom((BlockProto.Block)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(BlockProto.Block other) {
        if (other == BlockProto.Block.getDefaultInstance()) return this;
        if (other.hasHeader()) {
          mergeHeader(other.getHeader());
        }
        if (other.hasBody()) {
          mergeBody(other.getBody());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @Override
      public final boolean isInitialized() {
        return true;
      }

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        BlockProto.Block parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (BlockProto.Block) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private BlockHeaderProto.BlockHeader header_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          BlockHeaderProto.BlockHeader, BlockHeaderProto.BlockHeader.Builder, BlockHeaderProto.BlockHeaderOrBuilder> headerBuilder_;
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public boolean hasHeader() {
        return headerBuilder_ != null || header_ != null;
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public BlockHeaderProto.BlockHeader getHeader() {
        if (headerBuilder_ == null) {
          return header_ == null ? BlockHeaderProto.BlockHeader.getDefaultInstance() : header_;
        } else {
          return headerBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public Builder setHeader(BlockHeaderProto.BlockHeader value) {
        if (headerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          header_ = value;
          onChanged();
        } else {
          headerBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public Builder setHeader(
          BlockHeaderProto.BlockHeader.Builder builderForValue) {
        if (headerBuilder_ == null) {
          header_ = builderForValue.build();
          onChanged();
        } else {
          headerBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public Builder mergeHeader(BlockHeaderProto.BlockHeader value) {
        if (headerBuilder_ == null) {
          if (header_ != null) {
            header_ =
              BlockHeaderProto.BlockHeader.newBuilder(header_).mergeFrom(value).buildPartial();
          } else {
            header_ = value;
          }
          onChanged();
        } else {
          headerBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public Builder clearHeader() {
        if (headerBuilder_ == null) {
          header_ = null;
          onChanged();
        } else {
          header_ = null;
          headerBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public BlockHeaderProto.BlockHeader.Builder getHeaderBuilder() {

        onChanged();
        return getHeaderFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      public BlockHeaderProto.BlockHeaderOrBuilder getHeaderOrBuilder() {
        if (headerBuilder_ != null) {
          return headerBuilder_.getMessageOrBuilder();
        } else {
          return header_ == null ?
              BlockHeaderProto.BlockHeader.getDefaultInstance() : header_;
        }
      }
      /**
       * <pre>
       * 区块头部信息
       * </pre>
       *
       * <code>.BlockHeader header = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          BlockHeaderProto.BlockHeader, BlockHeaderProto.BlockHeader.Builder, BlockHeaderProto.BlockHeaderOrBuilder>
          getHeaderFieldBuilder() {
        if (headerBuilder_ == null) {
          headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              BlockHeaderProto.BlockHeader, BlockHeaderProto.BlockHeader.Builder, BlockHeaderProto.BlockHeaderOrBuilder>(
                  getHeader(),
                  getParentForChildren(),
                  isClean());
          header_ = null;
        }
        return headerBuilder_;
      }

      private BlockBodyProto.BlockBody body_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          BlockBodyProto.BlockBody, BlockBodyProto.BlockBody.Builder, BlockBodyProto.BlockBodyOrBuilder> bodyBuilder_;
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public boolean hasBody() {
        return bodyBuilder_ != null || body_ != null;
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public BlockBodyProto.BlockBody getBody() {
        if (bodyBuilder_ == null) {
          return body_ == null ? BlockBodyProto.BlockBody.getDefaultInstance() : body_;
        } else {
          return bodyBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public Builder setBody(BlockBodyProto.BlockBody value) {
        if (bodyBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          body_ = value;
          onChanged();
        } else {
          bodyBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public Builder setBody(
          BlockBodyProto.BlockBody.Builder builderForValue) {
        if (bodyBuilder_ == null) {
          body_ = builderForValue.build();
          onChanged();
        } else {
          bodyBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public Builder mergeBody(BlockBodyProto.BlockBody value) {
        if (bodyBuilder_ == null) {
          if (body_ != null) {
            body_ =
              BlockBodyProto.BlockBody.newBuilder(body_).mergeFrom(value).buildPartial();
          } else {
            body_ = value;
          }
          onChanged();
        } else {
          bodyBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public Builder clearBody() {
        if (bodyBuilder_ == null) {
          body_ = null;
          onChanged();
        } else {
          body_ = null;
          bodyBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public BlockBodyProto.BlockBody.Builder getBodyBuilder() {

        onChanged();
        return getBodyFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      public BlockBodyProto.BlockBodyOrBuilder getBodyOrBuilder() {
        if (bodyBuilder_ != null) {
          return bodyBuilder_.getMessageOrBuilder();
        } else {
          return body_ == null ?
              BlockBodyProto.BlockBody.getDefaultInstance() : body_;
        }
      }
      /**
       * <pre>
       * 区块数据体
       * </pre>
       *
       * <code>.BlockBody body = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          BlockBodyProto.BlockBody, BlockBodyProto.BlockBody.Builder, BlockBodyProto.BlockBodyOrBuilder>
          getBodyFieldBuilder() {
        if (bodyBuilder_ == null) {
          bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              BlockBodyProto.BlockBody, BlockBodyProto.BlockBody.Builder, BlockBodyProto.BlockBodyOrBuilder>(
                  getBody(),
                  getParentForChildren(),
                  isClean());
          body_ = null;
        }
        return bodyBuilder_;
      }
      @Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

      @Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:Block)
    }

    // @@protoc_insertion_point(class_scope:Block)
    private static final BlockProto.Block DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new BlockProto.Block();
    }

    public static BlockProto.Block getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Block>
        PARSER = new com.google.protobuf.AbstractParser<Block>() {
      @Override
      public Block parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Block(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<Block> parser() {
      return PARSER;
    }

    @Override
    public com.google.protobuf.Parser<Block> getParserForType() {
      return PARSER;
    }

    @Override
    public BlockProto.Block getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Block_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Block_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    String[] descriptorData = {
      "\n\021block/Block.proto\032\027block/BlockHeader.p" +
      "roto\032\025block/BlockBody.proto\"?\n\005Block\022\034\n\006" +
      "header\030\001 \001(\0132\014.BlockHeader\022\030\n\004body\030\002 \001(\013" +
      "2\n.BlockBodyB1\n#cn.aberic.bother.entity." +
      "proto.blockB\nBlockProtob\006proto3"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          BlockHeaderProto.getDescriptor(),
          BlockBodyProto.getDescriptor(),
        }, assigner);
    internal_static_Block_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_Block_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Block_descriptor,
        new String[] { "Header", "Body", });
    BlockHeaderProto.getDescriptor();
    BlockBodyProto.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
